require(['jquery','swiper','underscore','api'], function ($,Swiper,_,api) {
    _.templateSettings = _templateSettings;

    var swiper1 = new Swiper('.house-swiper', {
        pagination: '.house-swiper .swiper-pagination',
        paginationClickable: true,
        speed: 800,
        autoplay: 2000
    });
    var swiper2 = new Swiper('.service-swiper', {
        pagination: '.service-swiper .swiper-pagination',
        paginationClickable: true,
        speed: 800,
        autoplay: 2000
    });



    var swiper3 = new Swiper('.thumbnails-swiper', {
        spaceBetween: 10,
        centeredSlides: true,
        slidesPerView: 'auto',
        touchRatio: 0.2,
        slideToClickedSlide: true,
    });

    var swiper4 = new Swiper('.eight-container', {
        spaceBetween: 50,
    });
    swiper3.params.control = swiper4;
    swiper4.params.control = swiper3;

    var recommendsUrl = api.baseUrl+api.designer.recommends;


    $.get(recommendsUrl,{num: 4}, function (res) {
        var data = res.data;
        $('.relate-designer .row').append(_.template($('#relate-designer-item').html())({data: data}));
    });

});